cmake_minimum_required(VERSION 3.1)

set(project_name testProject) ## rename your project here

project(${project_name})

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED true)
add_compile_options(-std=c++11 -Wall -Werror -g)
add_library(${project_name}-lib
        src/AppComponent.hpp
        src/controller/MyController.hpp
        src/dto/RenameDTO.hpp
        src/webSocket/fileListener.h
        src/webSocket/fileListener.cpp
        src/activePage/downloadFile.h
        src/activePage/downloadFile.cpp
        src/otherLib/base64.cpp
        src/otherLib/base64.h
        src/otherLib/URLDecode.h
        src/otherLib/outputHex.cpp
        src/otherLib/BEtoLE.hpp
)

## link libs

find_package(oatpp 1.3.0 REQUIRED)
find_package(oatpp-websocket 1.3.0 REQUIRED)
find_package(fmt 8.1.1 REQUIRED)

target_link_libraries(${project_name}-lib
        PUBLIC oatpp::oatpp
        PUBLIC oatpp::oatpp-websocket
        PUBLIC fmt
)

target_include_directories(${project_name}-lib PUBLIC src)

## add executables

add_executable(${project_name}-exe
        src/App.cpp
        )
target_link_libraries(${project_name}-exe ${project_name}-lib)
add_dependencies(${project_name}-exe ${project_name}-lib)